module main

import ui
import os
import mymod


/*
编译器定义的变量，在编译时会被替换为实际的值
所有路径： vlib\v\token\token.v

Details: available compile time variables: 
@VROOT, @VMODROOT, @VEXEROOT, @FN, 
@METHOD, @MOD,
@STRUCT, @VEXE, @FILE, @DIR, @LINE, @COLUMN, @VHASH, @VCURRENTHASH, @VMOD_FILE, @VMODHASH,
@FILE_LINE, @LOCATION, @BUILD_DATE, @BUILD_TIME, @BUILD_TIMESTAMP, @OS, @CCOMPILER,
@BACKEND, @PLATFORM 
*/

struct Stu{}
fn (mut stu Stu)print(){

	println('@METHOD  is ${@METHOD}')
	println('@STRUCT   is ${@STRUCT }')
}
fn main() {
	test_1()	
}	

fn test_1(){
	os.chdir(@VROOT)or{panic(err)}

	println('@VROOT dir is ${os.getwd()}')

	os.chdir(@VMODROOT)or{panic(err)}
	println('@VMODROOT dir is ${os.getwd()}')

	os.chdir(@VEXEROOT)or{panic(err)}
	println('@VEXEROOT dir is ${os.getwd()}')

	println('@FN  is ${@FN}')
	println('@METHOD  is ${@METHOD}')
	println('@MOD   is ${@MOD}')
	println( 'file: ' + @FILE + ' | line: ' + @LINE + ' | fn: ' + @MOD + '.' + @FN)

	mymod.my_print()

	mut stu:=Stu{}
	stu.print()
}
